<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class Student extends Model
{
    protected $guarded = ['created_at','updated_at']; //黑名单


    /**
     * 民族信息
     * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
     */
    public function nations()
    {
        return $this->belongsTo('App\Models\Nation','nation','id');
    }


    /**
     * 所属驾校信息
     * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
     */
    public function school()
    {
        return $this->belongsTo('App\Models\School');
    }


    public function service()
    {
        return $this->belongsTo('App\Models\Service', 'service_id');
    }

}
